//Shows error message as ul list
//To write own function for showing validation errors use the next pattern.
//
//IMPORTANT!!!!
// - Use array of errors messages as variable    messageText
// - You must to use this pattern to insert ID of element that will show error
//                     id='" + idError + "'
// - Use element as DOM element that is validated
function list() {
    var errorHtml = "<ul id='" + idError + "' class='error'>";
    for (var i=0;i<messageText.length;i++) {
        errorHtml += "<li>" + messageText[i] + "</li>";
    };
    errorHtml += "</ul>";
    element.after(errorHtml);
};
